package ru.spb.bragnikita.myevents.navigation;

import javax.enterprise.context.RequestScoped;
import javax.inject.Named;
import java.io.File;

/**
 * @author Nikita.Brazhnikov
 */
@Named("nav")
@RequestScoped
public class NavigationBean {

	private String outcome = "links_target_page";

	public String getOutcome() {
		return outcome;
	}

	public void setOutcome(String outcome) {
		this.outcome = outcome;
	}

	public String next() {
		System.out.println(new File("file.file").getAbsolutePath());
		if (outcome == null || outcome.equals("null")) {
			System.out.println("Navigation: returning null");
			return null;
		} else {
			System.out.println("Navigation: returning " + outcome);
			return outcome;
		}
	}
}
